package com.winona.domain;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;

import com.winona.code.DataManager;
import com.winona.code.Resource;
import com.winona.code.ResourceManager;

public class CrmDataCenter extends DataManager implements Resource {
	/** 只是做暂时缓存使用，比如Intent之间的跳转 */
	public static String LIST_REFRESH = "LIST_REFRESH";
	private List<CustomerInfo> list = new ArrayList<CustomerInfo>();
	private List<CustomerInfo> matchsList = new ArrayList<CustomerInfo>();

	private static CrmDataCenter instance;

	private CrmDataCenter() {
	}

	public static CrmDataCenter getInstance() {
		if (instance != null)
			return instance;
		synchronized (CrmDataCenter.class) {
			if (instance == null) {
				instance = new CrmDataCenter();
				ResourceManager.getInstance().addResource(instance);
			}
		}
		return instance;
	}

	@Override
	public void releaseResource() {
		// TODO Auto-generated method stub

	}

	@Override
	public void clear() {
		// TODO Auto-generated method stub

	}

	public void clearList() {
		list.clear();
		noticeListener(LIST_REFRESH);
	}

	public void clearMatchList() {
		matchsList.clear();
	}

}
